package com.zyong.design.pattern.decorator.case3;

/**
 * @program: zyong-design-pattern
 * @ClassName: Client
 * @author: zyong
 * @create: 2024-04-29 00:08
 */
public class Client {
    public static void main(String[] args) {
        Coffee espresso = new Espresso();

        MilkDecorator milkDecorator = new MilkDecorator();
        milkDecorator.setCoffee(espresso);

        System.out.println(milkDecorator.getName() + " $" + milkDecorator.getPrice());

        SyrupDecorator syrupDecorator = new SyrupDecorator();
        syrupDecorator.setCoffee(milkDecorator);

        System.out.println(syrupDecorator.getName() + " $" + syrupDecorator.getPrice());
    }
}
